home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Misc / msql-1.0.6 / src / makedepend / imakemdep.h < prev    next >
C/C++ Source or Header  |  1994-10-16  |  12KB  |  603 lines

  1. /* $XConsortium: imakemdep.h,v 1.76 94/04/17 20:10:31 gildea Exp $ */
  2. /*
  3.  
  4. Copyright (c) 1993, 1994  X Consortium
  5.  
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12.  
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15.  
  16. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  19. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22.  
  23. Except as contained in this notice, the name of the X Consortium shall not be
  24. used in advertising or otherwise to promote the sale, use or other dealings
  25. in this Software without prior written authorization from the X Consortium.
  26.  
  27. */
  28.  
  29.  
  30. /* 
  31.  * This file contains machine-dependent constants for the imake utility.
  32.  * When porting imake, read each of the steps below and add in any necessary
  33.  * definitions.  In general you should *not* edit ccimake.c or imake.c!
  34.  */
  35.  
  36. #ifdef CCIMAKE
  37. /*
  38.  * Step 1:  imake_ccflags
  39.  *     Define any special flags that will be needed to get imake.c to compile.
  40.  *     These will be passed to the compile along with the contents of the
  41.  *     make variable BOOTSTRAPCFLAGS.
  42.  */
  43. #ifdef hpux
  44. #ifdef hp9000s800
  45. #define imake_ccflags "-DSYSV"
  46. #else
  47. #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
  48. #endif
  49. #endif
  50.  
  51. #if defined(macII) || defined(_AUX_SOURCE)
  52. #define imake_ccflags "-DmacII -DSYSV"
  53. #endif
  54.  
  55. #ifdef stellar
  56. #define imake_ccflags "-DSYSV"
  57. #endif
  58.  
  59. #if defined(USL) || defined(Oki) || defined(NCR)
  60. #define imake_ccflags "-Xc -DSVR4"
  61. #endif
  62.  
  63. #ifdef sony
  64. #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
  65. #define imake_ccflags "-DSVR4"
  66. #else
  67. #include <sys/param.h>
  68. #if NEWSOS < 41
  69. #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
  70. #else
  71. #if NEWSOS < 42
  72. #define imake_ccflags "-Dbsd43"
  73. #endif
  74. #endif
  75. #endif
  76. #endif
  77.  
  78. #ifdef _CRAY
  79. #define imake_ccflags "-DSYSV -DUSG"
  80. #endif
  81.  
  82. #if defined(_IBMR2) || defined(aix)
  83. #define imake_ccflags "-Daix -DSYSV"
  84. #endif
  85.  
  86. #ifdef Mips
  87. #  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
  88. #    define imake_ccflags "-DBSD43"
  89. #  else 
  90. #    define imake_ccflags "-DSYSV"
  91. #  endif
  92. #endif 
  93.  
  94. #ifdef is68k
  95. #define imake_ccflags "-Dluna -Duniosb"
  96. #endif
  97.  
  98. #ifdef SYSV386
  99. # ifdef SVR4
  100. #  define imake_ccflags "-Xc -DSVR4"
  101. # else
  102. #  define imake_ccflags "-DSYSV"
  103. # endif
  104. #endif
  105.  
  106. #ifdef __convex__
  107. #define imake_ccflags "-fn -tm c1"
  108. #endif
  109.  
  110. #ifdef apollo
  111. #define imake_ccflags "-DX_NOT_POSIX"
  112. #endif
  113.  
  114. #ifdef WIN32
  115. #define imake_ccflags "-nologo -batch -D__STDC__"
  116. #endif
  117.  
  118. #ifdef __uxp__
  119. #define imake_ccflags "-DSVR4 -DANSICPP"
  120. #endif
  121.  
  122. #ifdef __sxg__
  123. #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
  124. #endif
  125.  
  126. #ifdef sequent
  127. #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
  128. #endif
  129.  
  130. #ifdef _SEQUENT_
  131. #define imake_ccflags "-DSYSV -DUSG"
  132. #endif
  133.  
  134. #if defined(SX) || defined(PC_UX)
  135. #define imake_ccflags "-DSYSV"
  136. #endif
  137.  
  138. #ifdef nec_ews_svr2
  139. #define imake_ccflags "-DUSG"
  140. #endif
  141.  
  142. #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
  143. #define imake_ccflags "-DSVR4"
  144. #endif
  145.  
  146. #else /* not CCIMAKE */
  147. #ifndef MAKEDEPEND
  148. /*
  149.  * Step 2:  dup2
  150.  *     If your OS doesn't have a dup2() system call to duplicate one file
  151.  *     descriptor onto another, define such a mechanism here (if you don't
  152.  *     already fall under the existing category(ies).
  153.  */
  154. #if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_)
  155. #define    dup2(fd1,fd2)    ((fd1 == fd2) ? fd1 : (close(fd2), \
  156.                            fcntl(fd1, F_DUPFD, fd2)))
  157. #endif
  158.  
  159.  
  160. /*
  161.  * Step 3:  FIXUP_CPP_WHITESPACE
  162.  *     If your cpp collapses tabs macro expansions into a single space and
  163.  *     replaces escaped newlines with a space, define this symbol.  This will
  164.  *     cause imake to attempt to patch up the generated Makefile by looking
  165.  *     for lines that have colons in them (this is why the rules file escapes
  166.  *     all colons).  One way to tell if you need this is to see whether or not
  167.  *     your Makefiles have no tabs in them and lots of @@ strings.
  168.  */
  169. #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
  170. #define FIXUP_CPP_WHITESPACE
  171. #endif
  172. #ifdef WIN32
  173. #define REMOVE_CPP_LEADSPACE
  174. #define INLINE_SYNTAX
  175. #define MAGIC_MAKE_VARS
  176. #endif
  177.  
  178. /*
  179.  * Step 4:  USE_CC_E, DEFAULT_CC, DEFAULT_CPP
  180.  *     If you want to use cc -E instead of cpp, define USE_CC_E.
  181.  *     If use cc -E but want a different compiler, define DEFAULT_CC.
  182.  *     If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
  183.  */
  184. #ifdef hpux
  185. #define USE_CC_E
  186. #endif
  187. #ifdef WIN32
  188. #define USE_CC_E
  189. #define DEFAULT_CC "cl"
  190. #endif
  191. #ifdef apollo
  192. #define DEFAULT_CPP "/usr/lib/cpp"
  193. #endif
  194. #if defined(_IBMR2) && !defined(DEFAULT_CPP)
  195. #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
  196. #endif
  197. #if defined(sun) && defined(SVR4)
  198. #define DEFAULT_CPP "/usr/ccs/lib/cpp"
  199. #endif
  200. #ifdef __bsdi__
  201. #define DEFAULT_CPP "/usr/bin/cpp"
  202. #endif
  203. #ifdef __uxp__
  204. #define DEFAULT_CPP "/usr/ccs/lib/cpp"
  205. #endif
  206. #ifdef __sxg__
  207. #define DEFAULT_CPP "/usr/lib/cpp"
  208. #endif
  209. #ifdef _CRAY
  210. #define DEFAULT_CPP "/lib/pcpp"
  211. #endif
  212. #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
  213. #define DEFAULT_CPP "/usr/libexec/cpp"
  214. #endif
  215.  
  216. /*
  217.  * Step 5:  cpp_argv
  218.  *     The following table contains the flags that should be passed
  219.  *     whenever a Makefile is being generated.  If your preprocessor 
  220.  *     doesn't predefine any unique symbols, choose one and add it to the
  221.  *     end of this table.  Then, do the following:
  222.  * 
  223.  *         a.  Use this symbol in Imake.tmpl when setting MacroFile.
  224.  *         b.  Put this symbol in the definition of BootstrapCFlags in your
  225.  *             <platform>.cf file.
  226.  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
  227.  *             to the end of the command line.
  228.  * 
  229.  *     Note that you may define more than one symbol (useful for platforms 
  230.  *     that support multiple operating systems).
  231.  */
  232.  
  233. #define    ARGUMENTS 50    /* number of arguments in various arrays */
  234. char *cpp_argv[ARGUMENTS] = {
  235.     "cc",        /* replaced by the actual program to exec */
  236.     "-I.",        /* add current directory to include path */
  237. #ifdef unix
  238.     "-Uunix",    /* remove unix symbol so that filename unix.c okay */
  239. #endif
  240. #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
  241. # ifdef __i386__
  242.     "-D__i386__",
  243. # endif
  244. # ifdef __GNUC__
  245.     "-traditional"
  246. # endif
  247. #endif
  248. #ifdef M4330
  249.     "-DM4330",    /* Tektronix */
  250. #endif
  251. #ifdef M4310
  252.     "-DM4310",    /* Tektronix */
  253. #endif
  254. #if defined(macII) || defined(_AUX_SOURCE)
  255.     "-DmacII",    /* Apple A/UX */
  256. #endif
  257. #ifdef USL
  258.     "-DUSL",    /* USL */
  259. #endif
  260. #ifdef sony
  261.     "-Dsony",    /* Sony */
  262. #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
  263.     "-Dbsd43",
  264. #endif
  265. #endif
  266. #ifdef _IBMR2
  267.     "-D_IBMR2",    /* IBM RS-6000 (we ensured that aix is defined above */
  268. #ifndef aix
  269. #define aix        /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
  270. #endif
  271. #endif /* _IBMR2 */
  272. #ifdef aix
  273.     "-Daix",    /* AIX instead of AOS */
  274. #ifndef ibm
  275. #define ibm        /* allow BOOTSTRAPCFLAGS="-Daix" */
  276. #endif
  277. #endif /* aix */
  278. #ifdef ibm
  279.     "-Dibm",    /* IBM PS/2 and RT under both AOS and AIX */
  280. #endif
  281. #ifdef luna
  282.     "-Dluna",    /* OMRON luna 68K and 88K */
  283. #ifdef luna1
  284.     "-Dluna1",
  285. #endif
  286. #ifdef luna88k        /* need not on UniOS-Mach Vers. 1.13 */
  287.     "-traditional", /* for some older version            */
  288. #endif            /* instead of "-DXCOMM=\\#"          */
  289. #ifdef uniosb
  290.     "-Duniosb",
  291. #endif
  292. #ifdef uniosu
  293.     "-Duniosu",
  294. #endif
  295. #endif /* luna */
  296. #ifdef _CRAY        /* Cray */
  297.     "-Ucray",
  298. #endif
  299. #ifdef Mips
  300.     "-DMips",    /* Define and use Mips for Mips Co. OS/mach. */
  301. # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
  302.     "-DBSD43",    /* Mips RISCOS supports two environments */
  303. # else
  304.     "-DSYSV",    /* System V environment is the default */
  305. # endif
  306. #endif /* Mips */
  307. #ifdef MOTOROLA
  308.     "-DMOTOROLA",    /* Motorola Delta Systems */
  309. # ifdef SYSV
  310.     "-DSYSV", 
  311. # endif
  312. # ifdef SVR4
  313.     "-DSVR4",
  314. # endif
  315. #endif /* MOTOROLA */
  316. #ifdef SYSV386           /* System V/386 folks */
  317.     "-DSYSV386",
  318. # ifdef SVR4
  319.     "-DSVR4",
  320. # endif
  321. # ifdef ISC
  322.     "-DISC",         /* ISC 2.2.1 */
  323. # endif
  324. # ifdef SCO
  325.     "-DSCO",
  326. # endif
  327. # ifdef ESIX
  328.     "-DESIX",
  329. # endif
  330. # ifdef ATT
  331.     "-DATT",
  332. # endif
  333. # ifdef DELL
  334.     "-DDELL",
  335. #endif
  336. #endif
  337. #ifdef __osf__
  338.     "-D__osf__",
  339. # ifdef __mips__
  340.     "-D__mips__",
  341. # endif
  342. # ifdef __alpha
  343.     "-D__alpha",
  344. # endif
  345. # ifdef __i386__
  346.     "-D__i386__",
  347. # endif
  348. # ifdef __GNUC__
  349.     "-traditional"
  350. # endif
  351. #endif
  352. #ifdef Oki
  353.     "-DOki",
  354. #endif
  355. #ifdef sun
  356. #ifdef SVR4
  357.     "-DSVR4",
  358. #endif
  359. #endif
  360. #ifdef WIN32
  361.     "-DWIN32",
  362.     "-nologo",
  363.     "-batch",
  364.     "-D__STDC__",
  365. #endif
  366. #ifdef NCR
  367.     "-DNCR",    /* NCR */
  368. #endif
  369. #ifdef linux
  370.         "-traditional",
  371.         "-Dlinux",
  372. #endif
  373. #ifdef __uxp__
  374.     "-D__uxp__",
  375. #endif
  376. #ifdef __sxg__
  377.     "-D__sxg__",
  378. #endif
  379. #ifdef nec_ews_svr2
  380.     "-Dnec_ews_svr2",
  381. #endif
  382. #ifdef AMOEBA
  383.     "-DAMOEBA",
  384. # ifdef CROSSCOMPILE
  385.     "-DCROSS_COMPILE",
  386. # else
  387. #  ifdef i80386
  388.     "-Di80386",
  389. #  endif
  390. #  ifdef sparc
  391.     "-Dsparc",
  392. #  endif
  393. #  ifdef mc68000
  394.     "-Dmc68000",
  395. #  endif
  396. # endif
  397. #endif
  398. };
  399. #else /* else MAKEDEPEND */
  400. /*
  401.  * Step 6:  predefs
  402.  *     If your compiler and/or preprocessor define any specific symbols, add
  403.  *     them to the the following table.  The definition of struct symtab is
  404.  *     in util/makedepend/def.h.
  405.  */
  406. struct symtab    predefs[] = {
  407. #ifdef apollo
  408.     {"apollo", "1"},
  409. #endif
  410. #ifdef ibm032
  411.     {"ibm032", "1"},
  412. #endif
  413. #ifdef ibm
  414.     {"ibm", "1"},
  415. #endif
  416. #ifdef aix
  417.     {"aix", "1"},
  418. #endif
  419. #ifdef sun
  420.     {"sun", "1"},
  421. #endif
  422. #ifdef sun2
  423.     {"sun2", "1"},
  424. #endif
  425. #ifdef sun3
  426.     {"sun3", "1"},
  427. #endif
  428. #ifdef sun4
  429.     {"sun4", "1"},
  430. #endif
  431. #ifdef sparc
  432.     {"sparc", "1"},
  433. #endif
  434. #ifdef __sparc__
  435.     {"__sparc__", "1"},
  436. #endif
  437. #ifdef hpux
  438.     {"hpux", "1"},
  439. #endif
  440. #ifdef __hpux
  441.     {"__hpux", "1"},
  442. #endif
  443. #ifdef __hp9000s800
  444.     {"__hp9000s800", "1"},
  445. #endif
  446. #ifdef __hp9000s700
  447.     {"__hp9000s700", "1"},
  448. #endif
  449. #ifdef vax
  450.     {"vax", "1"},
  451. #endif
  452. #ifdef VMS
  453.     {"VMS", "1"},
  454. #endif
  455. #ifdef cray
  456.     {"cray", "1"},
  457. #endif
  458. #ifdef CRAY
  459.     {"CRAY", "1"},
  460. #endif
  461. #ifdef _CRAY
  462.     {"_CRAY", "1"},
  463. #endif
  464. #ifdef att
  465.     {"att", "1"},
  466. #endif
  467. #ifdef mips
  468.     {"mips", "1"},
  469. #endif
  470. #ifdef __mips__
  471.     {"__mips__", "1"},
  472. #endif
  473. #ifdef ultrix
  474.     {"ultrix", "1"},
  475. #endif
  476. #ifdef stellar
  477.     {"stellar", "1"},
  478. #endif
  479. #ifdef mc68000
  480.     {"mc68000", "1"},
  481. #endif
  482. #ifdef mc68020
  483.     {"mc68020", "1"},
  484. #endif
  485. #ifdef __GNUC__
  486.     {"__GNUC__", "1"},
  487. #endif
  488. #if __STDC__
  489.     {"__STDC__", "1"},
  490. #endif
  491. #ifdef __HIGHC__
  492.     {"__HIGHC__", "1"},
  493. #endif
  494. #ifdef CMU
  495.     {"CMU", "1"},
  496. #endif
  497. #ifdef luna
  498.     {"luna", "1"},
  499. #ifdef luna1
  500.     {"luna1", "1"},
  501. #endif
  502. #ifdef luna2
  503.     {"luna2", "1"},
  504. #endif
  505. #ifdef luna88k
  506.     {"luna88k", "1"},
  507. #endif
  508. #ifdef uniosb
  509.     {"uniosb", "1"},
  510. #endif
  511. #ifdef uniosu
  512.     {"uniosu", "1"},
  513. #endif
  514. #endif
  515. #ifdef ieeep754
  516.     {"ieeep754", "1"},
  517. #endif
  518. #ifdef is68k
  519.     {"is68k", "1"},
  520. #endif
  521. #ifdef m68k
  522.         {"m68k", "1"},
  523. #endif
  524. #ifdef m88k
  525.         {"m88k", "1"},
  526. #endif
  527. #ifdef __m88k__
  528.     {"__m88k__", "1"},
  529. #endif
  530. #ifdef bsd43
  531.     {"bsd43", "1"},
  532. #endif
  533. #ifdef hcx
  534.     {"hcx", "1"},
  535. #endif
  536. #ifdef sony
  537.     {"sony", "1"},
  538. #ifdef SYSTYPE_SYSV
  539.     {"SYSTYPE_SYSV", "1"},
  540. #endif
  541. #ifdef _SYSTYPE_SYSV
  542.     {"_SYSTYPE_SYSV", "1"},
  543. #endif
  544. #endif
  545. #ifdef __OSF__
  546.     {"__OSF__", "1"},
  547. #endif
  548. #ifdef __osf__
  549.     {"__osf__", "1"},
  550. #endif
  551. #ifdef __alpha
  552.     {"__alpha", "1"},
  553. #endif
  554. #ifdef __DECC
  555.     {"__DECC",  "1"},
  556. #endif
  557. #ifdef __decc
  558.     {"__decc",  "1"},
  559. #endif
  560. #ifdef __uxp__
  561.     {"__uxp__", "1"},
  562. #endif
  563. #ifdef __sxg__
  564.     {"__sxg__", "1"},
  565. #endif
  566. #ifdef _SEQUENT_
  567.     {"_SEQUENT_", "1"},
  568.     {"__STDC__", "1"},
  569. #endif
  570. #ifdef __bsdi__
  571.     {"__bsdi__", "1"},
  572. #endif
  573. #ifdef nec_ews_svr2
  574.     {"nec_ews_svr2", "1"},
  575. #endif
  576. #ifdef nec_ews_svr4
  577.     {"nec_ews_svr4", "1"},
  578. #endif
  579. #ifdef _nec_ews_svr4
  580.     {"_nec_ews_svr4", "1"},
  581. #endif
  582. #ifdef _nec_up
  583.     {"_nec_up", "1"},
  584. #endif
  585. #ifdef SX
  586.     {"SX", "1"},
  587. #endif
  588. #ifdef nec
  589.     {"nec", "1"},
  590. #endif
  591. #ifdef _nec_ft
  592.     {"_nec_ft", "1"},
  593. #endif
  594. #ifdef PC_UX
  595.     {"PC_UX", "1"},
  596. #endif
  597.     /* add any additional symbols before this line */
  598.     {NULL, NULL}
  599. };
  600.  
  601. #endif /* MAKEDEPEND */
  602. #endif /* CCIMAKE */
  603.